package com.ruoyi.goods.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品管理对象 products
 * 
 * @author mabo
 * @date 2025-01-06
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("products")
public class Products extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 商品唯一标识符，自增 */
    @TableId(value = "id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long id;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String productName;

    /** 商品库存，必须大于等于0 */
    @Excel(name = "商品库存，必须大于等于0")
    private Long stock;

    /** 商品描述 */
    @Excel(name = "商品描述")
    private String description;

    /** 商品图片链接 */
    @Excel(name = "商品图片链接")
    private String image;

    /** 商品价格，以积分表示 */
    @Excel(name = "商品价格，以积分表示")
    private Long pointsPrice;

    @Excel(name = "商品分类关联id")
    private int typeid;

    private String detail;
    /** 发布时间，默认为当前时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发布时间，默认为当前时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishedTime;
    @Excel(name = "是否参加活动标识")
    private int state;

    /** 逻辑删除标识，默认不删除 */
    @Excel(name = "逻辑删除标识，默认不删除")
    private Integer isDeleted;

    @TableField(value = "productCategories")
    private ProductCategories  productCategories;

    @TableField(value = "sales")
    private Sales sales;



}
